package cn.iocoder.yudao.module.reading.controller.app.community.vo.post;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.List;

/**
 * 社区帖子创建 Request VO
 *
 * @author 芋道源码
 */
@Schema(description = "用户 APP - 社区帖子创建 Request VO")
@Data
public class PostCreateReqVO {

    @Schema(description = "帖子类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "normal")
    @NotEmpty(message = "帖子类型不能为空")
    private String type;

    @Schema(description = "帖子标题", example = "分享一本好书")
    @Size(max = 200, message = "帖子标题长度不能超过200个字符")
    private String title;

    @Schema(description = "帖子内容", example = "今天读了一本很棒的绘本...")
    @Size(max = 500, message = "帖子内容长度不能超过500个字符")
    private String content;

    @Schema(description = "图片URL列表", example = "[\"https://example.com/image1.jpg\", \"https://example.com/image2.jpg\"]")
    @Size(max = 3, message = "最多只能上传3张图片")
    private List<String> images;

    @Schema(description = "关联作品ID", example = "1")
    private Long workId;

    @Schema(description = "作品类型", example = "book")
    private String workType;

}
